package com.example;

import com.example.AppConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.concurrent.TimeUnit;

public class Main {
    public static void main(String[] args) {
        System.out.println(">>> 正在启动 Spring 容器……");
        AnnotationConfigApplicationContext ctx =
                new AnnotationConfigApplicationContext(AppConfig.class);
        System.out.println(">>> Spring 容器启动完成！倒计时线程应该已经开始。");

        // 保持 65 秒，方便观察倒计时
        try { TimeUnit.SECONDS.sleep(65); } catch (InterruptedException ignored) {}
        ctx.close();
    }
}